<template>
  <div class="page_body">
    <div class="home_top">
      <div class="home_top_title">{{ topTitle }}</div>
    </div>

    <div class="codeBox">
      <img class="codeimg" :src="image_path" alt="" />
    </div>
  </div>
</template>

<script>
import HomeTop from "@/components/homeTop.vue";
import { Search } from "vant";
import { Indicator, Toast } from "mint-ui";
export default {
  name: "qrCode",
  components: {
    HomeTop,
    [Search.name]: Search,
  },
  data() {
    return {
      topTitle: "报名登记",
      image_path: "",
      id: "",
      name: "",
      ishdden: true,
      title: "",
    };
  },
  created() {
    console.log(this.$route.query.id);
    if (this.$route.query.id) {
      this.id = this.$route.query.id;
    } else {
      this.id = "1";
    }
    this.list();
    // this.onSearch();
  },
  methods: {
    list() {
      let url = "/mobile/getGroupQrcode";
      let data = {
        id: this.id,
      };
      this.axios
        .post(url, data)
        .then((res) => {
          if (res.code == 0) {
            this.image_path = res.image_path;
            this.title = res.title;
            console.log(res.title, this.title);
            console.log(res);
          } else {
            Toast({
              message: res.msg,
              duration: 3000,
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },
  },
};
</script>
<style scoped>
.page_body {
  width: 100vw;
  height: 100vh;
}
.page_list {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  box-sizing: border-box;
  padding-top: 0.8rem;
  overflow: hidden;
}
.page_title {
  color: #6c99f8;
  font-size: 0.46rem;
  text-align: center;
  margin: 1.7rem auto 1.9rem;
  width: 5.4rem;
  font-weight: 800;
}
.appear {
  display: block;
}
.vanish {
  display: none;
}
.page_input {
  padding: 0 0.2rem;
}

.page_input_main {
  margin: 0 0.5rem;
  background: #eeeeee;
  border-radius: 0.12rem;
  overflow: hidden;
  line-height: 1rem;
  display: flex;
  align-items: center;
}
input::-ms-input-placeholder {
  text-align: center;
}
input::-webkit-input-placeholder {
  text-align: center;
}
.searchImg {
  height: 0.46rem;
  margin: 0 0.8rem 0 0.3rem;
  display: inline-block;
}
.input_main {
  height: 1rem;
  width: 60%;
  border: none;
  background: #eeeeee;
}
.confirm {
  width: 3.4rem;
  height: 1rem;
  background: #016ffd;
  border-radius: 0.12rem;
  text-align: center;
  line-height: 1rem;
  color: #ffffff;
  font-size: 0.3rem;
  margin: 1.36rem auto;
}
.home_top {
  background: rgba(255, 218, 209, 1);
}

.emptyImg {
  margin-top: 30%;
}
.codeBox .codeimg {
  width: 100%;
}
</style>
